package com.wc.alorithm_luogu.P5718;

import java.util.Arrays;
import java.util.Scanner;

/**
 * @Author congge
 * @Date 2023/4/19 16:35
 * @description
 * https://www.luogu.com.cn/problem/P5718
 * P5718
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        int[] arr = new int[n];

        while (n-->0){
            arr[n] = sc.nextInt();
        }

        // 排序
        Arrays.sort(arr);

        System.out.println(arr[0]);
    }
}
